]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
ibusManager: Don't pass undefined callback to ibus
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 15 Nov 2018 17:47:55 +0000 (18:47 +0100)
committerJonas Ådahl <jadahl@gmail.com>
Sat, 17 Nov 2018 12:15:46 +0000 (12:15 +0000)
Since commit 551e8278416, we don't always pass a callback parameter.
However passing it on as undefined to ibus doesn't work, as gjs doesn't
accept that as a valid callback value and throw an error. As a result,
we can end up with no layout selected in the keyboard menu and an "empty"
indicator. Fix this by explicitly passing null if no callback has been
provided.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/293

js/misc/ibusManager.js

index 34f198c35eed3144c018f1b0025e1fc73ceb0ba4..33ad8777e39095e1b605d014743cd8578e3818f7 100644 (file)
@@ -210,7 +210,7 @@ var IBusManager = new Lang.Class({
         }
 
         this._ibus.set_global_engine_async(id, this._MAX_INPUT_SOURCE_ACTIVATION_TIME,
-                                           null, callback);
+                                           null, callback || null);
     },
 
     preloadEngines(ids) {